var app = getApp()

class System{
  static isAndroid(){
    return app.globalData.system.toLowerCase().indexOf("ios") == -1
  }
  static isIos() {
    return app.globalData.system.toLowerCase().indexOf("ios") != -1
  }
  static getSystem() {
    return System.isAndroid()?"android":"ios";
  }
}

if (app.globalData.system == null) app.globalData.system= wx.getSystemInfoSync()["system"];
module.exports = System